/**
 * @author Jjn
 * @since 2021-06-12 13:25
 */
public class Solution5_2_2 {
    public String reverseLeftWords(String s, int n) {
        if (s == null) {
            return null;
        }
        int length = s.length();
        s = s + s;
        n = n % length;
        return s.substring(n, n + length);
    }
    
    public static void main(String[] args) {
        Solution5_2_2 solution522 = new Solution5_2_2();
        System.out.println(solution522.reverseLeftWords("abcdq", 2));
    }
}
